import java.io.*;

public class position {
   public static void main (String[] args) throws IOException {
      if (args.length < 1 ) throw new RuntimeException ("not enough arguments");
      if ( args.length > 1 ) throw new RuntimeException ("too many arguments");
      BufferedReader reader = new BufferedReader (new FileReader (new File (args[0])));
      String line;
      while ( (line = reader.readLine()) != null) {
        //split the arguments in each line
        String[] multArgs = line.split(",");
        try {
        boolean b = isTrue (Integer.parseInt(multArgs[0]),Integer.parseInt(multArgs[1]),Integer.parseInt(multArgs[2]));
        if (b) System.out.println("true");
        else System.out.println("false");
        } catch (ArrayIndexOutOfBoundsException e) {
           System.err.println ("not enough arguments in the text file");
        }
        }
   }
static boolean  isTrue (int n, int p1, int p2 ){
     String binary = Integer.toBinaryString(n);
     if (binary.charAt(binary.length()-p1) == binary.charAt(binary.length()-p2)) return true;
     return false;

}
}